﻿using StackExchange.Redis;
using System;

namespace JNPF.Utils
{
    /// <summary>
    /// RedisConnection
    /// 版 本：V3.0.0
    /// 版 权：引迈信息技术有限公司（https://www.jnpfsoft.com）
    /// 作 者：JNPF开发平台组
    /// </summary>
    public class RedisConnection
    {
        private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
        {
            var redisConnection = ConfigurationKey.RedisConnectionString;
            return ConnectionMultiplexer.Connect(redisConnection);
        });
        public static ConnectionMultiplexer Connection
        {
            get
            {
                return lazyConnection.Value;
            }
        }
    }
}
